<?php
/**
 * 主任务表验证器
 */

namespace app\common\validate;

class UserOrderValidate extends Validate
{
    protected $rule = [
            'order_no|主订单编号' => 'require',
    'mid|商家id' => 'require',
    'price|价格' => 'require',
    'keyword|关键词' => 'require',
    'address|发货地址' => 'require',
    'url|商品链接' => 'require',
    'order_time|购买开始日期' => 'require',
    'back_gold|每单返金币' => 'require',
    'task_num|单数' => 'require',
    'require_content|任务要求' => 'require',
    'buy_num|数量' => 'require',
    'attr_name|规格' => 'require',

    ];

    protected $message = [
            'order_no.require' => '主订单编号不能为空',
    'mid.require' => '商家id不能为空',
    'price.require' => '价格不能为空',
    'keyword.require' => '关键词不能为空',
    'address.require' => '发货地址不能为空',
    'url.require' => '商品链接不能为空',
    'order_time.require' => '购买开始日期不能为空',
    'back_gold.require' => '每单返金币不能为空',
    'task_num.require' => '单数不能为空',
    'require_content.require' => '任务要求不能为空',
    'buy_num.require' => '数量不能为空',
    'attr_name.require' => '规格不能为空',

    ];

    protected $scene = [
        'add'  => ['order_no','mid','price','keyword','address','url','order_time','back_gold','task_num','require_content','buy_num','attr_name',],
'edit' => ['order_no','mid','price','keyword','address','url','order_time','back_gold','task_num','require_content','buy_num','attr_name',],

    ];

    

}
